package cn.icatw.gulimall.order.feign;

import cn.icatw.gulimall.order.vo.MemberAddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author icatw
 * @date 2022/3/25
 * @email 762188827@qq.com
 * @apiNote
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 下单时远程调用member服务查询会员地址
     *
     * @param memberId 成员身份
     * @return {@link List}<{@link MemberAddressVo}>
     */
    @GetMapping("member/memberreceiveaddress/{memberId}/addresses")
    List<MemberAddressVo> getAddress(@PathVariable("memberId") Long memberId);
}
